import 'dart:io';

import 'package:jskit/jskit.dart';

class BaseApiRequest<T, K> extends JSBaseRequest<T, K> {
  BaseApiRequest(
      {required super.url,
      required super.fromJson,
      super.data,
      super.parameters,
      super.timeout,
      super.method = DioMethod.get});


  @override
  int validate(DioResult? response) {
    if (response?.response != null) return 200;
    if (response?.response != null) {
      if (response?.response['code'] == 0) return 200;
    }
    return -1;
  }

}

enum LoginMethod {
  apple,
  google,
  facebook,
  tourist,
  email,
}

enum LoginType {
  apple,
  google,
  facebook,
}

